package Day08;

public class Demo05 {
    //int...nums  可变参数
    public static void main(String[] args) {
        int c = math(10,0,50,54,63,87);
        System.out.println(c);

    }
    public static int math(int...nums){
        int n = 0;
        for (int i = 0; i < nums.length; i++) {
            n += nums[i];
        }
        return n;
    }
}
